import request from '@/utils/request'
import defaultSettings from '@/settings'

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/search`,
}

export const apiUrlConfigApprove = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceApprove/search`,
}

export const apiUrlConfigCheckBrnoDetail = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceApprove/searchCheckBrnoDetail`,
}

export const apiUrlConfigBrnoUpdate = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/update`,
}

export const apiUrlConfigBrnoDetail = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/detail`,
}

export const reqConfigRelaBrnoList = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/searchDetail`,
}

//行号，行名查询行名行号表
export const apiUrlConfigBrnoSearch = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/cnaps2/Cnaps2BankBrno/brnoSearchList`,
};

//我行行号查询
export const apiUrlConfigBankCodeSearch = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/cnaps2/Cnaps2BankCodeInfo/ourBkSearch`,
};

// 获取下挂的机构信息
export function queryRelaBrnoList(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/searchDetail`,
    method: 'get',
    params: data,
  })
}

// 机构信息维护界面
export function queryBrnoUpdate(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/update`,
    method: 'get',
    params: data,
  })
}

// 机构信息明细界面
export function queryBrnoDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/detail`,
    method: 'get',
    params: data,
  })
}

// 删除机构维护信息
export function brnoDelete(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/delete`,
    method: 'post',
    data
  })
}

// 机构维护审核明细
export function brnoApproveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceApprove/detail`,
    method: 'get',
    params: data,
  })
}

// 内部机构维护新增提交
export function brnoSave(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/save`,
    method: 'post',
    data,
  })
}

// 内部机构维护修改提交
export function brnoUpdateSave(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceEntry/updateSave`,
    method: 'post',
    data,
  })
}

// 内部机构维护审核
export function brnoApprove(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceApprove/approve`,
    method: 'post',
    data,
  })
}

// 内部机构维护拒绝
export function brnoReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/systemManager/branchManager/OrganizationMaintenanceApprove/reject`,
    method: 'post',
    data,
  })
}



